package com.lagou.edu.factory.parsing;

public class BeanBuildDirector {
    private BeanBuilder beanBuilder;
    public BeanBuildDirector(BeanBuilder beanBuilder){
        this.beanBuilder = beanBuilder;
    }

    public BeanPool construct(BeanPool beanPool) throws Exception{
        //解析bean
        beanBuilder.parse(beanPool);
        //组装bean
        beanBuilder.assemble(beanPool);
        return beanPool;
    }
}
